1. Field of the Invention
The present invention relates to a data recording method and a data recording apparatus for extracting and recording one program data out of multiplexed data in which a plurality of program data are time-division multiplexed, and further relates to a data reproducing method and a data reproducing apparatus for reproducing the program extracted by the data recording method.
2. Description of the Related Art
The MPEG 2 (International Standard ISO/IEC 13818-1) proposed by the MPEG (moving picture expert group) is a coding system for compressing digital video and digital audio signals.
The MPEG 2 adopts a time-division multiplexing system using packets. For instance, video and audio signals are divided into streams called packets having an adequate length in multiplexing the video and audio signals by using this system and the packets of the video signal and of the audio signal are transmitted in a time-division manner while being switched appropriately.
The MPEG 2 also adopts a multiplexing and separating system accommodating to multi-programming in order to realize transmission of a plurality of program data. The use of this system allows not only video and audio signals composing one program (for example, one movie or film) to be transmitted in the time-division manner but also video and audio signals composing a plurality of programs (for example, some or more movies or films) to be transmitted in the time-division manner for example.
There is a system called a transport stream as one of such multiplexing and separating systems accommodating to multi-programming. According to this transport stream system, a PES (packetized elementary stream packet) is divided further into a plurality of packets to transmit a plurality of program data in the time-division manner. Each packet has a fixed length which is relatively short, i.e., 188 bytes in concrete.
It is necessary to synchronize an encoder provided in a transmitter and a decoder provided in a receiver (reproducing apparatus) in order to receive and reproduce the program data transmitted in the time-division manner by adopting the transport stream system. In the transport stream system, information for setting and calibrating clock reference called PCR (program clock reference) is transmitted to synchronize the encoder and the decoder based on it.
It is necessary to recognize the value of the PCR and the time when the PCR arrives at the decoder accurately in order to synchronize the encoder and the decoder by using the PCR. In concrete, the PCR is data of six bytes and the decoder must set the value of the PCR therein at the time when the final byte of the PCR has arrived. Then, using the PCR arrival time and the value of the PCR, the decoder sets or calibrates STC (System Time Clock) which is the basis on which the decoding and reproducing processes within the decoder are performed. More specifically, the decoder has a PLL (Phase Locked Loop) circuit in which a counter outputting the STC is built in. Every time when the PCR arrives, the PLL circuit calculates a difference between the value of the PCR and the value of the STC, converts its result into a control signal and performs a feedback control based on this control signal. It then allows the STC which coincides completely with the PCR arrival period to be created and the encoder provided in the transmitter and the decoder provided in the receiver to be synchronized at high precision.
By the way, a technology for receiving multiplexed data transmitted by using the multi-programming multiplexing and separating system as described above and for recording the received multiplexed data is now being developed. When such technology is established, it becomes possible for a broadcasting station providing a digital satellite broadcasting service to multiplex and transmit a plurality of movies recorded in digital signals to each home and for each home to record the movies transmitted from the broadcasting station in the digital signals as they are.
Two methods are now being proposed as methods for recording the multiplexed data transmitted by using the multi-programming multiplexing and separating system.
A first method is to record all of the transmitted multiplexed data. This method, however, has problems that a data amount becomes large because all of the multiplexed data is recorded and that unnecessary program data cannot be excluded even if it is contained in the multiplexed plurality of program data.
A second method is to extract and record one program data out of the transmitted multiplexed data. This method allows recording of only the necessary program data and reduction of the data amount. However, it has a problem that it causes a trouble in the synchronization by means of the PCR in reproducing the recorded program data.
That is, when the program data once recorded is to be reproduced, it is necessary to set or calibrate the STC in the reproducing apparatus based on the PCR in the same manner with the case of receiving and reproducing the multiplexed data transmitted from the transmitter. However, there arises a problem in extracting and recording one program data out of the time-division multiplex signals that the relationship between the time when the PCR is to be read and the value of the PCR is destroyed. That is, the arrangement of the PCR is destroyed by extracting one program data. As a result, the STC of the reproducing apparatus cannot be set or be calibrated based on the PCR.
It is an object of the present invention to solve the above-mentioned problems by providing a data recording method and a data recording apparatus which can extract at least one program from multiplexed data in which a plurality of programs are time-division multiplexed, and reconstruct the extracted at least one program as a program which is independent of the multiplexed data and which can be reproduced by a reproducing apparatus at high precision.
It is a further object of the present invention to provide a data reproducing method and a data reproducing apparatus which can reproduce the program extracted from the multiplexed data by using the data recording method of the present invention.
The above-mentioned object can be achieved by a data recording method in accordance with the present invention. The data recording method includes the processes of: receiving multiplexed data including a plurality of programs from an external source; extracting at least one program out of the programs included in the received multiplexed data; and recording the extracted at least one program. Each of programs is divided into a plurality of packets, and the programs are time-division multiplexed as the multiplexed data by a unit of the packet. In this data recording method, the extracting process includes the processes of: extracting the packets composing the at least one program to be extracted from the multiplexed data; generating packet number data indicating the number of the packet which is a part of the program except for the at least one program to be extracted from the multiplexed data, and which is located in the multiplexed data and located between the packet previously extracted in the packet extracting process and the packet currently extracted in the packet extracting process; and recording the packets extracted in the packet extracting process and the packet number data generated in the generating process.
By this data recording method, at least one program can be extracted from the multiplexed data, and recorded as a program independent of the multiplexed data. In the program recorded by this method, only the packets composing the extracted one program and the packet number data are arranged. That is, the packets composing the program other than this extracted program are not included in the program recorded by this method. Therefore, it is possible to make the amount of the recorded program smaller than that of the multiplexed data.
Meanwhile, the packets composing the respective programs are multiplexed in the multiplexed data. Because of this, in the multiplexed data, the packets composing one program to be extracted are placed at relatively long intervals. In contrast, in the recorded program, only the packets composing one program and the packet number data are arranged. Because of this, in the recorded program, the packets are placed without interval. Thus, the locations of the packets in the recorded program are different from the locations of the packets in the multiplexed data in time.
In order to reproduce the recorded program, it is preferable that the locations of the packets read out from the recorded program are matched with the locations of the packets in the multiplexed data in time. That is, it is preferable that the locations of the packets are restored to the state when these packets were placed in the multiplexed data.
When the recorded program is reproduced, it is possible to easily restore the locations of the packets read out from the recorded program by using the packet number data as follows. The packet number data indicates the number of packets composing other program which existed between the packets composing one program to be extracted. For example, if the packet number data indicates xe2x80x9c3xe2x80x9d, the number of the packets composing other program which existed between two packets which are contained in one program to be extracted is three. In this case, when reproducing the recorded program, the first packet in the recorded program is firstly read out and reproduced, and then, the next packet in the recorded program is read out and reproduced after the period of time necessary for reproducing three packets has passed. Thus, the locations of the reproduced packets can be matched with the locations of the packets in the multiplexed data in time. Hence, the synchronization in a reproducing apparatus when the recorded program is reproduced can be easily established, and the recorded program can be reproduced by the reproducing apparatus at high precision.
In the data recording method of the present invention, when the packets extracted in the packet extracting process and the packet number data generated in the generating process are recorded, the packet number data may be inserted between the packet previously extracted in the packet extracting process and the packet currently extracted in the packet extracting process. As a result, the previous packet, the packet number data, and the current packet are arrayed in the recorded program in this order. As a result, the previous packet, the packet number data and the current packet can be reproduced in this order. Therefore, when the recorded program is reproduced, the locations of the packets can be easily restored to the state when these packets were arranged in the multiplexed data.
In the data recording method of the present invention, when the packet number data is generated, if there is no packet which is contained in the program except for the at least one program to be extracted from the multiplexed data between the packet previously extracted in the packet extracting process and the packet currently extracted in the packet extracting process, the packet number data indicating that there is no packet is generated. As a result, regardless of whether or not there is a packet contained in the program other than one program to be extracted between the packets contained in the program to be extracted, the packet number data can always be generated. Therefore, it is possible to make the structure of the recorded program simple.
In order to reproduce the recorded program, a data reproducing method includes the processes of: reading the packets and the packet number data from the program extracted by the data recording method; reproducing the packets read in the reading process; and setting a period of time necessary for reproducing the packet or the packets whose number is indicated by the packet number data read in the reading process between a reproduction of the packet previously read in the reading process and a reproduction of the packet currently read in the reading process. In this data reproducing method, by using the packet number data included in the recorded program, the locations of the packets read out from the recorded program can be easily restored to the state when these packets were placed in the multiplexed data. Hence, the recorded program can be reproduced at high precision.
Furthermore, the time period setting process of the data reproducing method may includes the processes of: generating a blank packet or a plurality of blank packets whose number is indicated by the packet number data read in the reading process; and inserting the blank packet or the plurality of blank packets generated in the generating process between the packet previously read in the reading process and the packet currently read in the reading process. Each blank data contains no data to be reproduced, but the blank packets correspond to the packets which were placed between the packets contained in one program to be extracted in the multiplexed data in time. Therefore, only if the blank packets are reproduced together with the ordinary packets, the locations of the packets (ordinary packets) can be much easily restored to the state when these packets were placed in the multiplexed data.
The above-mentioned object can be achieved by a data recording apparatus in accordance with the present invention. The data recording apparatus includes: a receiving device for receiving multiplexed data including a plurality of programs from an external source; an extracting device for extracting at least one program out of the programs included in the received multiplexed data; and a recording device for recording the extracted at least one program. Each of programs is divided into a plurality of packets. The programs are time-division multiplexed as the multiplexed data by a unit of the packet. The extracting device includes: a packet extracting device for extracting the packets composing the at least one program to be extracted from the multiplexed data; a generating device for generating packet number data indicating the number of the packet which is a part of the program except for the at least one program to be extracted from the multiplexed data, and which is located in the multiplexed data and located between the packet previously extracted by the packet extracting device and the packet currently extracted by the packet extracting device; and a recording device for recording the packets extracted by the packet extracting device and the packet number data generated by the generating device.
In this data recording apparatus, the recording device may inserts the packet number data between the packet previously extracted by the packet extracting device and the packet currently extracted by the packet extracting device.
Furthermore, in the data recording apparatus, if there is no packet which is the part of the program except for the at least one program to be extracted from the multiplexed data between the packet previously extracted by the packet extracting device and the packet currently extracted by the packet extracting device, the generating device may generate the packet number data indicating that there is no packet.
Meanwhile, in order to reproduce the recorded program recorded by the above mentioned data recording method, a data reproducing apparatus of the present invention is provided. The data reproducing apparatus includes: a reading device for reading the packets and the packet number data from the program extracted by using the above-mentioned data recording method; a reproducing device for reproducing the packets read by the reading device; and a setting device for setting a period of time necessary for reproducing the packet or the packets whose number is indicated by the packet number data read in the reading process between a reproduction of the packet previously read by the reading device and a reproduction of the packet currently read by the reading device.
In this data reproducing apparatus, the setting device may includes: a blank packet generating device for generating a blank packet or a plurality of blank packets whose number is indicated by the packet number data read by the reading device; and an inserting device for inserting the blank packet or the plurality of blank packets generated by the generating device between the packet previously read by the reading device and the packet currently read by the reading device.